package com.ykcloud.soa.erp.fi.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.ykcloud.soa.erp.fi.api.service.DemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author mdl
 * @version 1.0
 * @date 2022/3/10 11:16
 */
@Service
public class DemoServiceImpl implements DemoService {

    @Autowired
    private JdbcTemplate jdbcTemplate;

    @Override
    public List selectFi() {
        return  jdbcTemplate.queryForList("select * from fi_voucher_report_hdr limit 10");
    }

    @Override
    @DS("mdms")
    public List selectMdms() {
        return  jdbcTemplate.queryForList("select * from mdms_o_cort limit 100");
    }
}
